from django.conf.urls.defaults import patterns, include, url
from web.views import get_mdetail,get_mlist,get_tread
from weibofactory.oauth import login,login_check,logout

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'sinaweibo.views.home', name='home'),
    # url(r'^sinaweibo/', include('sinaweibo.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    #(?P<kw>.+) kw='char';(?P<page>\d+) page='int'
    url(r'^mov/(?P<kw>.+)$', get_mdetail),
    url(r'^home/', get_mlist),
    url(r'^tread/(?P<tread>.+)$', get_tread),
    url(r'^log/$', login, name='log'),
    url(r'^logincheck/$', login_check, name='logcheck'),
    url(r'^logout/$', logout, name='logout'),
)
